package com.h2cloud.threadPool;

import java.util.function.Consumer;

/**
 * @Package: com.h2cloud.threadPool
 * @ClassName: testInterface
 * @Author: h2cloud
 * @CreateTime: 2022/8/7 11:27 下午
 * @Description:
 */
public class testInterface {
	private static void consumeString(Consumer<String> function) {
		function.accept("Hello");
	}

	private static void consumeString(
			Consumer<String> one,
			Consumer<String> two) {
		one.andThen(two).accept("Hello");
	}

	public static void main(String[] args) {
		consumeString(
				s -> System.out.println(s.toUpperCase()),
				s -> System.out.println(s.toLowerCase())
  );
	}
}
